package com.oneboot.bbsdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName tb_bbs_post
 */
@TableName(value ="tb_bbs_post")
@Data
public class Post implements Serializable {
    /**
     * 帖子主键id
     */
    @TableId(value = "post_id", type = IdType.AUTO)
    private Long post_id;

    /**
     * 发布者id
     */
    @TableField(value = "publish_user_id")
    private Long publish_user_id;

    /**
     * 帖子标题
     */
    @TableField(value = "post_title")
    private String post_title;

    /**
     * 帖子内容
     */
    @TableField(value = "post_content")
    private String post_content;

    /**
     * 帖子分类id
     */
    @TableField(value = "post_category_id")
    private Integer post_category_id;

    /**
     * 帖子分类(冗余字段)
     */
    @TableField(value = "post_category_name")
    private String post_category_name;

    /**
     * 0-未审核 1-审核通过 2-审核失败 (默认审核通过)
     */
    @TableField(value = "post_status")
    private Integer post_status;

    /**
     * 阅读量
     */
    @TableField(value = "post_views")
    private Long post_views;

    /**
     * 评论量
     */
    @TableField(value = "post_comments")
    private Long post_comments;

    /**
     * 收藏量
     */
    @TableField(value = "post_collects")
    private Long post_collects;

    /**
     * 最新修改时间
     */
    @TableField(value = "last_update_time")
    private Date last_update_time;

    /**
     * 添加时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}